<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
use Zend\Db\Adapter\Adapter as DbAdapter;
use Application\Model\ServicesTable;

class ActualiteController extends AbstractActionController
{
	protected $serviceTable;
	
    public function actualiteAction(){
    	return new ViewModel();
    }
    

    

  	
    public function getServiceTable()
    {
    	if (!$this->serviceTable) {
    		$sm = $this->getServiceLocator();
    		$config = $sm->get('config');
    		$config = $config['db'];
    		$dbAdapter = new DbAdapter($config);
    		//return $dbAdapter;
    		$table = new ServicesTable($dbAdapter);
    		//$this->userTable = $sm->get($table);
    		$this->serviceTable = $table;
    	}
    	return $this->serviceTable;
    }
}
